import myRequest, * as request from '@/utils/api.js'


export function getInviteLink() { // 用户查询邀请码
	return request.get(`/terminal/partner/user/funding/inviteLink`);
}
export function getOneLevelInviteUser(params = {}) { // 查看一级邀请用户
	return request.post(`/terminal/partner/user/funding/recordlog/select`, params);
}
export function getUserVipStatus(params = {}) { // 查看用户vip状态
	return request.get(`/terminal/membe/query/ter/member/detailnew`, params);
}
export function geTinvitationAwardlog(params = {}) { // 用户邀请登录奖励
	return request.get(`/terminal/partner/user/invitation/awardlog/select`, params);
}
export function getequityLogSelectMysl(params = {}) { // 上级查看直接下级购买东西接口
	return request.get(`/terminal/partner/user/equity/log/selectMysl`, params);
}

export function getWebInfo(params = {}) {
	return request.get('/terminal/agen/domain/select', params);
}

export function getFont() { //字体
	return request.get(`/quickhome/fontfile/query/font/file`);
}
export function postPpt2imgtest(data = {}) { //获取ppt信息
	let formData = new FormData();
	for (const key in data) {
		formData.append(key, data[key]);
	};
	return request.post('/thirdparty/ppt2imgtest/ppt2imgtest', formData);
}

export function getVideoParamete(params) { // 用户查询视频尺寸
	return request.get(`/quickhome/commonParamete1/select`, params);
}
export function getMatOfPage(params = {}) { //分页获取公共模板
	return request.get('/quickhome/sysmatter/query/mat/page', {
		params: params
	});
}
export function getSysmatTwoType(type) { //系统素材分类
	return request.get(`/quickhome/sysmatter/query/all/sysmatTwoType/${type}`);
}
export function getVideoSysmat(params) { // 用户根据二级类型查询元素
	return request.get(`/quickhome/sysmatter/query/all/sysmatDetailsNew`, params);
}
export function getVideoSysmatAll(params) { //  用户根据二级类型查询全部元素
	return request.get(`/quickhome/sysmatter/query/allMatter/sysmat`, params);
}
export function getVideoSysmatById(params) { //  用户根据id查询元素
	return request.get(`/quickhome/sysmatter/selectonetemplate`, params);
}
export function getAdminSysmatTwoType(type) { //系统素材分类
	// return request.get(`admin/quickhome/query/all/sysmatTwoType/${type}`);
	return request.get(`/quickhome/sysmatter/query/all/sysmatTwoType/${type}`);
}
export function getAdminVideoSysmat(params) { // 用户根据二级类型查询元素
	// return request.get(`admin/quickhome/query/all/sysmatDetailsNew`, params);
	return request.get(`/quickhome/sysmatter/query/all/sysmatDetailsNew`, params);
}
export function getAdminVideoSysmatAll(params) { //  用户根据二级类型查询全部元素
	// return request.get(`admin/quickhome/query/all/sysmat`, params);
	return request.get(`/quickhome/sysmatter/query/allMatter/sysmat`, params);
}
export function getModel(params = {}) { //获取模特
	return request.get('/thirdparty/video/getModel', {
		params: params
	});
}
export function getLingyu(params = {}) { //获取音频领域
	return request.get('/quickhome/voicefield/query/all', params);
}
export function getAudioManOfLingyu(fieldId) { //获取音频人
	return request.get(`/quickhome/voicefield/query/voiceuser/${fieldId}`);
}
export function getStyleOfAudioMan(budid) { //获取音频人风格
	return request.get(`/quickhome/dub/query/audio/${budid}`);
}
export function getAudioManOfPage(params) { //分页获取音频人
	return request.get(`quickhome/dub/quer/audio/page`, params);
}

export function postAudioTTS(params) { //tts接口
	return request.post(`/thirdparty/audio/tts/upload`, params);
}

export function getUserVideo_old(userId) { //获取用户视频
	// return request.get('/video/query/user/' + userId);
	return request.get('/terminal/userbindvideo/query/' + userId);
}
export function getUserVideoById(videoId) { //获取用户视频
	// return request.get('/video/query/user/' + userId);
	return request.get('/terminal/userbindvideo/query/video/' + videoId);
}
export function getUserVideo(videoId) { //获取用户视频
	// return request.get('/video/query/user/' + userId);
	return request.get('/terminal/userbindvideo/query/tervideo');
}

export function getListenerVideoSchedule(videoId) { //视频进度查询
	// return request.get('/video/query/user/' + userId);
	return request.get(`/terminal/generate/listener/video/schedule/${videoId}`);
}
export function getScheduleListenerLive(streamingSn) { //直播间进度查询
	return request.get(`/terminal/videocmp/schedule/listener/live/${streamingSn}`);
}

export function getVideomodel(videoType) { // 用户视频模板
	return request.get(`/quickhome/apifoxmodel/query/sys/videomodel/${videoType}`);
}

// 用户私有素材操作
export function getUserSource(type) { //用户查询
	return request.get(`terminal/terminallmatter/query/matter/${type}`);
}
export function deleteUserSource(id) { //用户删除
	return request.post(`terminal/terminallmatter/delete/matter/${id}`);
}
export function updateUserSource(params) { //用户修改
	return request.post(`terminal/terminallmatter/update/matter`, params);
}
export function uploadUserSource(params) { //用户上传
	return request.post(`terminal/terminallmatter/upload/single/matter`, params);
}
export function getVideomodel2(videoType) { // 用户私有视频模板 
	return request.get(`/terminal/terminallmatter/query/matter/${videoType}`);
}

export function getDelVideo(videoSn) { // 删除用户视频
	return request.get(`/terminal/userbindvideo/del/video/${videoSn}`);
}
export function getUpdateVideoname(params) { // 修改用户视频名称
	return request.get(`/terminal/userbindvideo/update/videoname`, params);
}


export function getSelectMyselfUserBindDraft(params = {}) { //草稿查询
	// return request.get('/video/query/user/' + userId);
	return request.get('/terminal/tmuUserBindDraft/query/draft', params);
}
// export function getSelectMyselfUserBindDraft(params = {}) {//草稿查询
//     // return request.get('/video/query/user/' + userId);
//     return request.post('/terminal/tmuUserBindDraft/selectMyself', params);
// }
export function getCacheAdvanceRetreatSelectall(params = {}) { //草稿缓存查询
	// return request.get('/video/query/user/' + userId);
	return request.get('/terminal/cacheAdvanceRetreat/selectall', params);
}
export function getDeleteCao(params) { //用户删除草搞
	return request.get(`terminal/tmuUserBindDraft/deleteMyDraft`, params);
}
export function postUpdateCao(params) { //用户修改草搞
	return request.post(`terminal/tmuUserBindDraft/updateMyDraft`, params);
}

export function logout(params) { //退出登录
	return request.post('/auth/logout');
}

export function getOrderConfirm(productId) { //订单确认
	return request.get(`/order/web/confirm/${productId}`);
}
export function postOrderSubmit(params) { //订单提交
	return request.post(`/order/web/submit`, params);
}
export function getOrderPay(params) { //订单支付
	return request.get(`/order/web/pay`, params);
}
export function getVIPOrderConfirm(productId) { //购买vip订单确认
	return request.get(`/order/web/quick/confirm/${productId}`);
}
export function postVIPOrderSubmit(params) { //购买vip订单提交
	return request.post(`/order/web/quick/submit`, params);
}
export function getVIPOrderPay(params) { //购买vip订单支付
	return request.get(`/order/web/quick/pay`, params);
}
export function getOrderDetail(params) { //获取订单详情
	return request.get('/order/order/query/order/detail');
}
export function getOrderDetail2(queryType, params) { //获取订单详情
	return request.get(`/order/query/detail/page/${queryType}`, params);
}
export function getCommodityAll(queryType, params = {}) { //获取商品列表
	return request.get(`/product/users/commodity/query/commodity/all`, params);
}
export function getCommodityByCmdId(cmdId, params = {}) { //获取商品详情商品详情
	return request.get(`/product/users/commodity/query/commodity/${cmdId}`, params);
}
export function getPriceAll(params = {}) { //获取会员商品
	return request.get(`product/memberprice/query/price/all`, params);
}
export function getVirtualcoinrationAll(params = {}) { //获取所有 权益：金币 比例
	return request.get(`product/virtualcoinration/query/all`, params);
}
export function getPayStatus(orderSn, params = {}) { //订单状态监听
	return request.get(`order/query/wx/pay/status/${orderSn}`, params);
}

export function getLogconsumeinfoQueryInfo(params) { //查看消费明细
	return request.get('/totallog/logconsumeinfo/query/info');
}
export function getOrderDetailPage(params) { //分页获取订单详情
	return request.get('/order/order/query/order/detail/page', params);
}
export function getLogconsumeinfoQueryInfoPage(params) { //分页查看消费明细
	return request.get('/totallog/logconsumeinfo/query/info/pagenew', params);
	return request.get('/totallog/logconsumeinfo/query/info/page', params);
}
export function postLogconsumeinfoQueryInfoDetail(params) { //查看消费明细详情
	// videoSn、productType
	return request.post('/totallog/logconsumeinfo/query/info/detail', params);
}
export function getHomeDetailInfo(params) { //终端个人详情页
	return request.get('/terminal/terminaluser/ter/home/detail');
}
export function getUserinternalstorage(params) { //终端查询个剩余空间
	return request.get('/terminal/userinternalstorage/query/storage');
}
export function getUserVideoByPage(params = {}) { //分页查询所有该用户合成的视频
	return request.get('/terminal/userbindvideo/query/tervideo/page', params);
}
export function getUserVideoByPageOfId(params = {}) { //分页查询所有该用户合成的视频
	return request.get(`/terminal/userbindvideo/query/video/${params.id}`);
}

export function getQmsUserHumanModelByMyself(params) { //查询私有模特
	return request.get(`quickhome/material1/qmsUserHumanModel/pri_hmq`, params);
}
export function getQmsUserHumanModelByMyselfold(params) { //查询私有模特
	return request.get(`quickhome/material1/qmsUserHumanModel/myself`, params);
}
export function getQmsUserHumanModelTwoType(params) { //查询模特分类
	return request.get(`quickhome/material1/qmsUserHumanModel/humanModelTwoType`, params);
}
export function getQmsUserHumanModelById(params) { //分类id查询模特
	return request.get(`quickhome/material1/qmsUserHumanModel/humanModelselectss`, params);
}
export function getAdminQmsUserHumanModelTwoType(params) { //查询模特分类
	return request.get(`quickhome/material1/qmsUserHumanModel/humanModelTwoType`, params);
	return request.get(`admin/quickhome/humanModelTwoType`, params);
}
export function getAdminQmsUserHumanModelById(params) { //分类id查询模特
	return request.get(`quickhome/material1/qmsUserHumanModel/humanModelselectss`, params);
	return request.get(`admin/quickhome/humanModelselectss`, params);
}
export function getQmsUserHumanModel() { //查询模特
	return request.get(`quickhome/material1/qmsUserHumanModel/superclass`);
}
export function getQmsUserHumanModelSon(params) { //查询模特子分类
	return request.get(`quickhome/material1/qmsUserHumanModel/son`, params);
}

//用户绑定音频作品
export function postAndioadd(params = {}) { //添加音频作品
	return request.post(`terminal/userbindandio/andioadd`, params);
}
export function postAndioupdate(params = {}) { //修改音频作品
	return request.post(`terminal/userbindandio/andioupdate`, params);
}
export function postAndioselect(params = {}) { //查找音频作品
	return request.post(`terminal/userbindandio/andioselect`, params);
}
export function getAndioremove(params = {}) { //删除音频作品
	return request.get(`terminal/userbindandio/andioremove`, params);
}
export function getUserbindandioInfo(params = {}) { //音频作品汇总
	return request.get(`terminal/userbindandio/collect`, params);
}
export function getUserbindvideoInfo(params = {}) { //视频作品汇总
	return request.get(`terminal/tmuUserBindDraft/collect`, params);
}

//用户数据修改
export function changePass(params) { //修改密码
	return request.post('/terminal/terminaluser/amend/info', params);
}
export function postchangeInfo(params) { //修改个人信息
	return request.post('/terminal/terminaluser/amend/detail/info', params);
}
export function getOSS(params = {}) { //上传oss
	return request.get('/thirdparty/oss/policy');
}
export function postOSS(params = {
	reqType: "",
	matName: "未命名",
	payLoad: {}
}) {
	// return request.post('/thirdparty/oss/policy', params);
	return request.post('/terminal/uploadSingleFile/uploadSingleFile', params);
}


// 直播间产品素材
export function postLiveProductAdd(params = {}) { //直播间产品新增
	return request.post('/terminal/streaming/products/add', params);
}
export function postLiveProductUpdate(params = {}) { //直播间产品修改
	return request.post('/terminal/streaming/products/update', params);
}
export function getLiveProductDelete(params = {}) { //直播间产品删除
	return request.get('/terminal/streaming/products/delete', params);
}
export function getLiveProductSelect(params = {}) { //直播间产品查询
	return request.get('/terminal/streaming/products/select', params);
}
export function postLiveProductMaterialAdd(params = {}) { //直播间产品新增
	return request.post('/terminal/streaming/products/material/add', params);
}
export function postLiveProductMaterialUpdate(params = {}) { //直播间产品修改
	return request.post('/terminal/streaming/products/material/update', params);
}
export function getLiveProductMaterialSelect(params = {}) { //直播间产品对应素材查询
	return request.get('/terminal/streaming/products/material/select', params);
}
export function getLiveProductMaterialDelete(params = {}) { //直播间产品对应素材删除
	return request.get('/terminal/streaming/products/material/delete', params);
}
// 直播间问答库
export function questionsSelectType(params = {}) { //问答库分类
	return request.get('/terminal/questions/selectType', params);
}
export function questionsSelectAllType(params = {}) { //问答库多级分类
	return request.get('/terminal/questions/selectAllType', params);
}
export function questionsDeleteType(params = {}) { //问答库分类
	return request.get('/terminal/questions/deleteType', params);
}
export function questionsAddType(params = {}) { //问答库分类
	return request.post('/terminal/questions/addType', params);
}
export function questionsUpdateType(params = {}) { //问答库分类
	return request.post('/terminal/questions/updateType', params);
}

export function questionsSelectsome(params = {}) { //问答库问答
	return request.get('/terminal/questions/selectsome', params);
}
export function questionsDeletesome(params = {}) { //问答库问答
	return request.get('/terminal/questions/deletesome', params);
}
export function questionsAddsome(params = {}) { //问答库问答
	return request.post('/terminal/questions/addsome', params);
}
export function questionsUpdatesome(params = {}) { //问答库问答
	return request.post('/terminal/questions/updatesome', params);
}
// 直播间操作
export function liveSelectAll(params = {}) {
	return request.get('/terminal/streaming/user/live/selectall', params);
}
export function liveSelect(params = {}) {
	return request.get('/terminal/streaming/user/live/select', params);
}
export function liveDelete(params = {}) {
	return request.get('/terminal/streaming/user/live/delete', params);
}
export function liveAdd(params = {}) {
	return request.post('/terminal/streaming/user/live/add', params);
}
export function liveUpdate(params = {}) {
	return request.post('/terminal/streaming/user/live/update', params);
}

// 合成数字人
export function postCustomizationAdd(params) { //合成数字人上传素材
	return request.post('/terminal/mode/personal/customization/add', params);
}

export function getCommodityCustomall(params) { //查询定制列表
	return request.get('/product/users/commodity/query/commodity/customall', params);
}
export function postAudioSynthesis(params) { //音频集合成一条mp3
	return request.post('/thirdparty/audio/tts/audioSynthesis', params);
}


export function appUpdate(params) { //app自动更新
	return request.get('/thirdparty/updatedata/updatedata', params);
}
export function materialUpload(params) { //app用户数字人上传接口
	return request.post('/quickhome/MuseTalk/materialUpload', params);
}
export function getSelectauditlist(params) { //获取app用户数字人
	return request.get('/quickhome/MuseTalk/selectauditlist', params);
}
export function postVideoCompound3(params) { //用户生成视频
	return request.post(`/thirdparty/video/video/compound/three`, params);
}
export function processingVideo(params) { //获取视频帧
	return request.get(`/thirdparty/video/video`, params);
}
export function getDuration(params, opt) { //获取时间
	return request.get('/thirdparty/ds/gat', params, opt);
}

export function getHotspotTabbarList(params, opt) { //查询热门文案分类
	return request.get(`/aiwork/motif/query/${params.classify_type}`, opt);
}
export function getAiworkRtsNews(params, opt) { //查询热门文案前五条
	return request.get('/aiwork/rts/news', params, opt);
}
export function getAiworkRtsQuery(params, opt) { //查询分类分页数据
	return request.get('/aiwork/rts/query', params, opt);
}
export function postAiworkChatChat_news(params, opt) { //热门文案生成文案
	return request.post('/aiwork/chat/chat_news', params, opt);
}
export function getExchangeVerificationCodenew(params, opt) { //热门文案生成文案
	return request.get(`/terminal/exchange/code/table/exchangeVerificationCodenew/${params.code}`);
}